package com.tnr.scgcxx.service.info.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tnr.scgcxx.dao.info.CustomerDao;
import com.tnr.scgcxx.model.info.Customer;
import com.tnr.scgcxx.service.info.CustomerService;

@Service
public class CustomerServiceImpl implements CustomerService {

	@Autowired
	private CustomerDao customerDao;
	
	@Override
	public List<Customer> findCustomers(Customer customer) {
		return customerDao.findCustomers(customer);
	}

	@Override
	public int deleteCustomerById(Integer cus_id) {
		return customerDao.deleteCustomerById(cus_id);
	}

	@Override
	public int deleteCustomerByIds(Integer[] cus_ids) {
		return customerDao.deleteCustomerByIds(cus_ids);
	}

	@Override
	public int addCustomer(Customer customer) {
		return customerDao.addCustomer(customer);
	}

	@Override
	public int updateCustomer(Customer customer) {
		return customerDao.updateCustomer(customer);
	}

	@Override
	public int updateCustomerStatusByIds(Integer[] customer_ids, String customer_status) {
		return customerDao.updateCustomerStatusByIds(customer_ids,customer_status);
	}

	@Override
	public Customer findCustomerById(Integer cus_id) {
		return customerDao.findCustomerById(cus_id);
	}

}
